package cn.demomaster.quickpicturer.util;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

public class StringUtil {
    public static List<String> StringSet2Array(Set<String> keySet) {
        List<String> stringList;
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
            stringList = keySet.stream()
                    .map(String::valueOf)
                    .collect(Collectors.toList());
        }else {
            stringList = new ArrayList<>();
            for (String str : keySet) {
                stringList.add(str);
            }
        }
        return stringList;
    }
}
